package com.i8office.android.zhihuixinwu.module.contract;

import com.cyan.tools.base.BasePresenter;
import com.cyan.tools.base.BaseView;
import com.cyan.tools.callback.RequestCallback;
import com.i8office.android.zhihuixinwu.bean.Code;
import com.i8office.android.zhihuixinwu.bean.Empl;
import com.i8office.android.zhihuixinwu.bean.Favorite;
import com.i8office.android.zhihuixinwu.bean.WorkSheet;
import com.i8office.android.zhihuixinwu.bean.WorkSheetNew;

import java.util.Map;

import io.reactivex.disposables.Disposable;

/**
 * Created by pc on 2018/7/7.
 */

public interface DetailContract {
    interface Model {
        Disposable getDetail(RequestCallback<WorkSheet> callback, String mid);

        Disposable getDetailDep(RequestCallback<WorkSheetNew> callback, String mid);

        Disposable addFavorite(RequestCallback<Code> callback, String mid);

        Disposable cancelFavorite(RequestCallback<Code> callback, String mid);

        Disposable addDepFavorite(RequestCallback<Code> callback, String mid);

        Disposable cancelDepFavorite(RequestCallback<Code> callback, String mid);

        Disposable messageHandler(RequestCallback<Empl> callback, Map<String, String> params);

        Disposable isFavorite(RequestCallback<Favorite> callback, String mid);
        Disposable isDepFavorite(RequestCallback<Favorite> callback, String mid);
    }

    interface View extends BaseView {
        void showDetail(WorkSheet workSheet);

        void showDetailDep(WorkSheetNew workSheet);

        void showFavorite(Favorite favorite);

        void saveCellSuccess();

        void messageHandlerResult(Empl empl);

        void sendSuccess();

        void onfailed();

//        void openResult();

        void collectResult(boolean b);
    }

    interface Presenter extends BasePresenter {
        void getDetail(String mid);

        void getDetailDep(String mid);

        void addFavorite(String mid);

        void cancelFavorite(String mid);

        void addDepFavorite(String mid);

        void cancelDepFavorite(String mid);

        void saveCell(Map<String, String> params);

        void messageHandler(Map<String, String> params);

        void send(Map<String, String> params);

        void open(Map<String, String> params);

        void sendNotification(Map<String, String> map);

        void isFavorite(String mid);
        void isDepFavorite(String mid);
    }
}
